package svc

import (
	"ewaimai/api/internal/config"
	"ewaimai/waimairpc/waimairpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	WaimaiRpc waimairpcclient.Waimairpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		WaimaiRpc: waimairpcclient.NewWaimairpc(zrpc.MustNewClient(c.WaimaiRpc)),
	}
}
